{% extends "layouts/application.html" %}
{% block content %}

<link rel="stylesheet" href="/site_media/openwysiwyg/style/wysiwyg.css" type="text/css">

<script type="text/javascript" src="/site_media/openwysiwyg/scripts/wysiwyg.js"></script>
<script type="text/javascript" src="/site_media/openwysiwyg/scripts/wysiwyg-settings.js"></script>

<script type="text/javascript">
	WYSIWYG.attach('context'); // default setup
	function check(){
		var title = document.getElementById('title').value
		var context = document.getElementById('context').value
		if (title==''||context==''){
			alert('主题和内容不能为空！');
			return false;
		}
		return true;
	}
</script>

<div align="center">
  <DIV class=boxright>
    <DIV class=bltop2>
      <div align="left">
        <strong>&nbsp;&nbsp;&nbsp;当前位置：&nbsp;&nbsp;
          <a href="../index">论坛</a>&nbsp;&nbsp;
          <img src="/site_media/images/zd_arrow.gif">
		  <a href="#">发表新贴</a>
        </strong>
      </div>
    </DIV>
    <DIV class=c_box>
<form action="" method="post" onsubmit="return check()">
<TABLE id=forum_main cellSpacing=1 BORDER="0">
  <THEAD>
    <TR>
  <TD colSpan=2>发表主题</TD></TR></THEAD>
  <TBODY>
  <TR>
    <TD class=row1>主题 (注意发贴规则勿灌水)</TD>
    <TD class=row2 align="left">
    <input id="title" name="title" size="30" style="WIDTH: 450px" type="text"  class="text" />
    {{form.title.errors}}
    </TD>
  </TR>
  <TR>
    <TD class=row1>&nbsp;</TD>
    <TD  align="LEFT" >
		<textarea id="context" name="context" cols="60" rows="20"></textarea>
		{{form.context.errors}}
      <DIV
        align=center>提示：内容长度最大64KB，约2万多汉字，如果出现超长（比如从Word粘贴带格式文本）被截断的问题，请分开发布
      </DIV>

    </TD>
  </TR>
      <TR>
        <TD class=row1>&nbsp;</TD>
      <TD>
        <INPUT onclick="return chk_content();" onMouseOver="this.className='submit2'" onMouseOut="this.className='submit'" class=submit id="" type=submit value=保存 name="">

      </TD>
    </TR>
</TABLE>
	</form>
    </DIV>
  </DIV>
</div>
{% endblock %}
